package com.hzsai.mininote.entity;

import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import org.hibernate.validator.constraints.Length;

import javax.validation.constraints.NotNull;

/**
 * @author hzsai
 * @date 2020/1/8 23:51
 * @usage: 注册用户类简易信息类
 */
@ApiModel(description = "注册用户时信息")
@Data
public class UserVO {

    @NotNull(message = "用户名不能为空")
    @Length(min = 2, max = 30, message = "名字长度错误，需在2~30之间")
    @ApiModelProperty("用户姓名")
    String name;

    @NotNull(message = "密码不能为空")
    @Length(min = 6, max = 30, message = "密码长度错误，需在6~30之间")
    @ApiModelProperty("用户密码")
    String password;
}
